//
//  SXFeedBackView.m
//  ShiXun
//
//  Created by lanou on 15/11/4.
//  Copyright © 2015年 张琪. All rights reserved.
//

#import "SXFeedBackView.h"

@implementation SXFeedBackView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 84, kScreenWidth - 40, 40)];
        titleLabel.text = @"欢迎提出意见和反馈，用户的需求是我们努力的方向，我们的进步离不开你的意见和建议😊";
        titleLabel.font = [UIFont systemFontOfSize:14];
        titleLabel.numberOfLines = 0;
        [self addSubview:titleLabel];
        
        _messageText = [[UITextView alloc] initWithFrame:CGRectMake(20, 134, kScreenWidth - 40, 150)];
        _messageText.editable = YES;
        _messageText.font = [UIFont systemFontOfSize:15];
        _messageText.scrollEnabled  = YES;
        _messageText.layer.borderWidth = 0.5;
        _messageText.layer.borderColor = [UIColor grayColor].CGColor;
        _messageText.layer.cornerRadius = 5.0;
        [self addSubview:_messageText];
        
        _placeLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 7, 130, 20)];
        _placeLabel.font = [UIFont systemFontOfSize:17];
        _placeLabel.textColor = [UIColor colorWithWhite:0.773 alpha:1.000];
        _placeLabel.text = @"请输入反馈信息";
        [_messageText addSubview:_placeLabel];
        
        _numberText = [[UITextField alloc] initWithFrame:CGRectMake(20, 294, kScreenWidth - 40, 25)];
        _numberText.placeholder = @"请输入手机/QQ/邮箱";
        _numberText.layer.borderWidth = 0.2;
        _numberText.layer.cornerRadius = 5.0;
        [self addSubview:_numberText];
        
        _referButton = [UIButton buttonWithType:UIButtonTypeSystem];
        _referButton.frame = CGRectMake(20, 334, kScreenWidth - 40, 25);
        _referButton.backgroundColor = [UIColor colorWithRed:0.089 green:0.325 blue:0.549 alpha:1.000];
        [_referButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [_referButton setTitle:@"提交" forState:UIControlStateNormal];
        _referButton.layer.cornerRadius = 5.0;
        [self addSubview:_referButton];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
